/* ========================= */
/* GRUNDLAGEN               */
/* ========================= */

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: #f5f5f5;
  overflow-y: auto;
}

/* ========================= */
/* NAVIGATION                */
/* ========================= */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(4px);
  z-index: 10000;
}

.top-nav-inner {
  max-width: 2000px;
  margin: 0 auto;
  height: 48px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 40px;
  padding: 0 40px;
}

.top-nav a {
  color: black;
  text-decoration: none;
  font-size: 17px;
}

.top-nav a:hover {
  opacity: 0.6;
}

/* ========================= */
/* RAUM (HINTERGRUND)        */
/* ========================= */

.room {
  position: relative;
  min-height: 100vh;
  width: 100%;

  background-image: url("wand2.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center bottom;
}






/* ========================= */
/* GALERIE                   */
/* ========================= */

.gallery {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 60px;
  padding-top: 120px;   /* Platz unter Navi */
  padding-bottom: 200px;
}

.image-container {
  max-width: 300px;
  width: 100%;
  text-align: center;
  position: relative;
}

.base-image {
  width: 100%;
  border: 8px solid rgb(74, 66, 52);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.hover-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.4s ease;
  pointer-events: none;
}

.image-container:hover .hover-image {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}

.image-container p {
  margin-top: 12px;
  font-size: 22px;
}

/* Link soll nicht wie Standard-Link aussehen */
.image-link{
  text-decoration: none;
  color: inherit;
  display: inline-block; /* wichtig für transform */
}

/* ganzer "Bild-Block" bekommt Hover-Feedback */
.image-link .image-container{
  transition: transform 0.25s ease;
  transform-origin: center;
}

/* beim Hover: leicht größer */
.image-link:hover .image-container{
  transform: scale(1.04);
  cursor: pointer;
}

/* Text unter dem Bild: wirkt klickbar */
.image-link p{
  color:  rgb(74, 66, 52);
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

/* beim Hover: Textfarbe ändern + leicht "aktiv" */
.image-link:hover p{
  color: rgba(0,0,0,1);
  letter-spacing: 0.3px;
  text-decoration: underline;
}

/* optional: schöner Fokus für Tastatur (Accessibility) */
.image-link:focus-visible{
  outline: 2px solid rgba(0,0,0,0.5);
  outline-offset: 6px;
  border-radius: 6px;
}

.image-link img{
  cursor: pointer;
}


/* ========================= */
/* MOBILE                    */
/* ========================= */

@media (max-width: 900px) {
  .image-container{
    width: min(48vw, 260px);  /* kleiner + gedeckelt */
    max-width: none;
  }



  .gallery {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding-top: 140px;
    padding-bottom: 260px; /* Boden am Ende */
  }

  .image-container {
    max-width: 60%;
  }

  .image-container p {
    font-size: 18px;
  }
}

/* ========================= */
/* PUZZLE                    */
/* ========================= */

#puzzleOverlay {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 999999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease;


 /* Raum als Hintergrund */
  background-image: url("wand2.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center bottom;

  transition: opacity 0.4s ease;

}

#puzzleContainer {
  width: 350px;
  height: 500px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#puzzleText {
  font-size: 18px;
  text-align: center;
  margin-bottom: 20px;
}

#puzzleSlot,
#puzzlePiece {
  width: 260px;
}

#puzzleSlot {
  opacity: 0.8;
  margin-bottom: 40px;
}

#puzzlePiece {
  position: absolute;
  cursor: grab;
  touch-action: none;
}

#puzzlePiece.dragging {
  cursor: none;
  transform: scale(1.05);
}










